package com.Bigbluebook.Service;

import com.Bigbluebook.entity.Star;
import com.Bigbluebook.entity.StarStatus;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;

public interface StarService {
    @POST("stars")
    Call<Star> starPost(@Body Star star);

    @GET("posts/{postId}/stars")
    Call<List<Star>> getStarsForPost(@Path("postId") int postId);

    @DELETE("stars/{id}")
    Call<Void> unstarPost(@Path("id") int starId);

    @GET("stars/posts/{postId}/user/{userId}/hasStared")
    Call<StarStatus> checkLikeStatus(@Path("postId") int postId, @Path("userId") int userId);
}
